package com.whcoding.rabbitmq.example.deal;


import com.alibaba.fastjson.JSONObject;
import com.whcoding.rabbitmq.example.consumer.ConsumerHandler;
import com.whcoding.rabbitmq.pojo.OrmDeptVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

@Service
public class DealMessage {

    private static final Logger logger = LoggerFactory.getLogger(ConsumerHandler.class);

    /**
     * 处理订单发送通知
     *
     * @param message
     */
    public void dealOrderCodeSend(String message) {
        if (StringUtils.isEmpty(message)) {
            return;
        }
        logger.info("处理签收code通知 获取的JOSN为{}", message);
    }

    /**
     * 签收订单数据处理
     *
     * @param jsonMsg
     */
    public void dealOrderCodeSign(String jsonMsg) {
        if (StringUtils.isEmpty(jsonMsg)) {
            return;
        }
        OrmDeptVO deptVO = JSONObject.parseObject(jsonMsg, OrmDeptVO.class);
        logger.info("处理签收code通知 获取的JOSN为{}", jsonMsg);
    }


}
